package com.usian.service;

import com.github.pagehelper.PageInfo;
import com.usian.pojo.Train;
import com.usian.pojo.TrainDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Email 2781921355@qq.com
 * @Author 马忠豪
 * @Date 2023/8/23 19:28
 */
@FeignClient(value = "day151")
public interface TrainService {
    @RequestMapping("trainconsumer/findTrain")
    public Integer findTrain(@RequestParam("token") String token);
    @RequestMapping("train/findNewTrain")
    public List<Train> findNewTrain();
    @RequestMapping("train/getNewTrain")
    public PageInfo<Train> getNewTrain(@RequestBody TrainDto trainDto);
    @RequestMapping("trainconsumer/getTrainNum")
    public List<Integer> getTrainNum(@RequestParam("token") String token, @RequestParam("trainId") Integer trainId);
    @RequestMapping("trainconsumer/addTrainConsumer")
    public List<Integer> addTrainConsumer(@RequestParam("token") String token, @RequestParam("trainId") Integer trainId);
}
